FROM microsoft/dotnet-framework-build:4.7.1 AS build-env

WORKDIR /webapp
COPY . .

RUN msbuild.exe /t:Build /p:Configuration=Release /p:OutputPath=out

FROM microsoft/dotnet-framework:4.7.1
WORKDIR /webapp
COPY --from=build-env /webapp/out ./
ENTRYPOINT ["dotnetapp.exe"]